From 10201a9dd6494b81ccaff1cf9fb3cc43470d5128 Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Mon, 21 Nov 2005 13:15:08 +0100 Subject: [PATCH] Removed, now unused. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/scheduler.py | 42 ------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 tools/python/xen/xend/scheduler.py diff --git a/tools/python/xen/xend/scheduler.py b/tools/python/xen/xend/scheduler.py deleted file mode 100644 index 3782948453..0000000000 --- a/tools/python/xen/xend/scheduler.py +++ /dev/null @@ -1,42 +0,0 @@ -#============================================================================ -# This library is free software; you can redistribute it and/or -# modify it under the terms of version 2.1 of the GNU Lesser General Public -# License as published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -#============================================================================ -# Copyright (C) 2004, 2005 Mike Wray -# Copyright (C) 2005 XenSource Ltd -#============================================================================ - -import threading - -def later(delay, fn, *args, **kwargs): - """Schedule a function to be called later. - - @param delay: delay in seconds - @param fn: function - @param args: arguments (list) - @param kwargs keyword arguments (map) - """ - timer = threading.Timer(delay, fn, args=args, kwargs=kwargs) - timer.start() - return timer - -def now(fn, *args, **kwargs): - """Schedule a function to be called now. - - @param fn: function - @param args: arguments (list) - @param kwargs keyword arguments (map) - """ - thread = threading.Thread(target=fn, args=args, kwargs=kwargs) - thread.start() - return thread -- 2.30.2